﻿@model Lead2012.ViewModels.DashboardViewModel

<div id="milestones">
    <ul class="accordeon-tabs mod-milestone">
        <li class="open">
            <span class="tab">
                <span id="expMilestoneMetrics" class="expander" data-bind="click: expMilestone"></span>
                <span>Số liệu có giá trị</span>
            </span>
            <span class="toolbar" data-bind="visible: ShowToolbar">
                <span class="areadashboard">
                    <div id="ddlAllLeadSources" class="select-holder combobox-mid spl" style="width:205px;">
                        <select id="selectLead" class="editable-select" data-bind='value: CreditLead, foreach: CreditLeadOptions, optionsCaption: "All Lead Sources"' style="width:203px;">
                            <option data-bind="value: ID, text: ItemName"></option>
                        </select>
                    </div>

                    <div id="ddlAllUsers" class="select-holder combobox-mid spl" data-bind="visible: ShowUserList" style="width:205px;">
                        <select id="selectUsers" class="editable-select" data-bind='value: CreditUsers, foreach: CreditUsersOptions, optionsCaption: "All Users"' style="width:203px;">
                            <option data-bind="value: ID, text: ItemName"></option>
                        </select>
                    </div>
                </span>

                <span class="area">
                    <span class="spl"><strong>Ngày được gán</strong></span>
                    <input type="radio" class="radio spl" name="range" value="true" data-bind="checked: RangeOption"  />

                    <div class="select-holder sel-range spl" >
                        <select id="selectDate" data-bind='enable: RangeEnable, value: CreditDate, foreach: CreditDateOptions, optionsCaption: "Today"'>
                            <option data-bind="value: ID, text: ItemName"></option>
                        </select>
                    </div>

                    <span class="spl"><strong>or</strong></span>

                    <input type="radio" class="radio spl" name="range" value="false" data-bind="checked: RangeOption" />
                    <label for="txt-from" class="spl">Từ:</label>
                    <input type="text" id="startDate" value='@Model.FromDate.ToString("dd/MM/yyyy")' class="text date spl" data-bind="enable: FromDateEnable" />

                    <label for="txt-from" class="spl">Đến:</label>
                    <input type="text" id="endDate" value='@Model.ToDate.ToString("dd/MM/yyyy")' class="text date" data-bind="enable: ToDateEnable" />
                </span>

                <span class="area left">
                    <a class="btn btn-go" href="javascript:void(1);" data-bind="click: search">Print</a>
                </span>
            </span>
            <span class="panel" data-bind="visible: ShowPanel">
                <div class="table table-metrics">
                    <div class="title">
                        <div class="col1">Không giá trị</div>
                        <div class="col1 col2">Liên hệ</div>
                        <div class="col1 col3">Tiềm năng</div>
                    </div>
                    <div class="line">
                        <div class="col1" data-bind="text: MilestoneNone"></div>
                        <div class="col1 col2" data-bind="text: MilestoneContacted"></div>
                        <div class="col1 col3" data-bind="text: MilestoneRate"></div>
                    </div>
                </div>
            </span>
        </li>
    </ul>
</div>